package com.efivestar.idm.api.util;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class CommonUtils {
    public static final Pattern MOBILE_REGEX = Pattern.compile("1[3-9]\\d{9}");
    /**
     * 验证手机号格式.
     *
     * @param mobileNumber
     * @return
     */
    public static boolean checkMobileNumber(String mobileNumber) {
        boolean flag = false;
        try {
            Matcher matcher = MOBILE_REGEX.matcher(mobileNumber);
            flag = matcher.matches();
        } catch (Exception e) {
            flag = false;
        }
        return flag;
    }
}
